home *** CD-ROM | disk | FTP | other *** search
- public class EffectWeaponTaser extends Codex {
- private CodexActor _Creator;
- private CodexActor _Target;
- private int beamGuid;
-
- public void EndEffect() {
- CodexThing beam = new CodexThing(this.beamGuid);
- beam.Remove();
- }
-
- public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration) {
- this._Creator = new CodexActor(creatorGuid);
- this._Target = new CodexActor(actorGuid);
- this.beamGuid = this._Creator.SpawnThing("blueLightningOne");
- CodexThing beam = new CodexThing(this.beamGuid);
- float[] offset = new float[3];
- beam.AllocateFrames(2);
- offset = this._Target.GetPosition();
- offset[2] += 64.0F;
- beam.SetFramePosition(1, offset);
- offset[0] = offset[1] = offset[2] = 0.0F;
- this._Creator.AttachThing(this.beamGuid, this._Creator.FindBone(25), offset, 1);
- }
-
- public void killed(int guid, int causeID, int captureID) {
- this.EndEffect();
- }
-
- public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason) {
- this.EndEffect();
- }
- }
-